package cn.imnaer.service.rpc.scenic.dao;

import cn.imnaer.database.BaseDao;
import cn.imnaer.database.MatchConst;
import cn.imnaer.database.define.DBConstant;
import cn.imnaer.service.persistence.model.Scenic;
import cn.imnaer.service.persistence.model.ScenicGroup;
import cn.imnaer.service.persistence.model.consts.SCENIC;
import cn.imnaer.service.persistence.model.consts.SCENICGROUP;
import cn.imnaer.service.rest.view.model.BasicScenic;
import cn.imnaer.service.rest.view.model.Place;

import org.bson.BSONObject;
import org.bson.BasicBSONObject;

import java.util.ArrayList;
import java.util.List;

public class ScenicGroupDaoImpl extends BaseDao<ScenicGroup> {
    private static ScenicGroupDaoImpl instance = new ScenicGroupDaoImpl();
    private ScenicGroupDaoImpl() {
       
    }

    public static ScenicGroupDaoImpl getInstance() {
        return instance;
    }

	@Override
	protected String getDbSpaceName() {
		return DBConstant.SPACE.SCENIC_INFO_SPACE;
	}

	@Override
	protected String getDbCollectionName() {
		return DBConstant.COLLECTION.SCENICGROUP_INFO_COLLECTION;
	}

	@Override
	protected String getPrimaryKey() {
		return SCENICGROUP.scenicGroupId;
	}
	public List<String> getSenicIdsByPk(String  scenicGroupId){
	  ScenicGroup scenicGroup = this.findOneByPk(scenicGroupId);
	  return scenicGroup.getRelationScenics();
	}

		
}
